package com.qupai.controller.user;

import com.qupai.dto.PtRegistrationAddDTO;
import com.qupai.result.Result;
import com.qupai.service.PtRegistrationService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("userPtRegistrationController")
@RequestMapping("/user/ptregister")
@Slf4j
@Tag(name = "普通-C端-活动报名表浏览接口")
@RequiredArgsConstructor
public class PtRegistrationController {

    private final PtRegistrationService registrationService;

    @PostMapping
    @Operation(summary = "根据用户id报名活动")
    public Result<String> signUpActivity(@RequestBody PtRegistrationAddDTO registrationAddDTO){
        registrationService.addByStudentId(registrationAddDTO);
        return Result.success();
    }
}
